@import "../vars";

.xdh-form {
  &--inline {
    .el-form-item, .xdh-form-append {
      display: inline-block;
    }
  }
}

.xdh-form {
  .xdh-form-item {
    &.is-block {
      display: block;
    }

    &.is-custom-width {
      width: auto !important;
    }

    .el-select, .el-input, .el-cascader, .el-input-number, .el-slider, .el-rate {
      width: 100%;
      display: inline-block;
      min-width: 100px;
    }
  }

  &.el-form--label-top {
    .el-select, .el-input, .el-cascader {
      width: 100%;
    }

    .el-form-item__label {
      padding: 0;
    }
  }

  &.is-inline-size {
    .el-select, .el-input, .el-cascader {
      width: 100%;
    }
  }

  &.is-inline-medium {
    > .xdh-form-item {
      width: 500px;
    }
  }

  &.is-inline-small {
    > .xdh-form-item {
      width: 300px;
    }
  }

  &.is-inline-large {
    > .xdh-form-item {
      width: 600px;
    }
  }

  &__footer {
    margin-bottom: 0;

    &.is-border {
      border-top: 1px solid $--border-color-light;
      padding: 10px 0;
    }

    &.is-center {
      text-align: center;
      display: block;
    }

    &.is-right {
      text-align: right;
      display: block;
    }

    &.is-left {
      text-align: left;
      display: block;
    }
  }
}

.xdh-form-divider {
  position: relative;
}
